package com.youko.backstage.service.commodity;

import com.youko.backstage.bean.commodity.CommodityCategory;
import com.youko.backstage.mapper.commodity.CommodityCategoryMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author: youko
 * @classname: CommodityCategoryService
 * @Description: some desc
 * @date: 2022/7/5 11:07
 */
@Service
public class CommodityCategoryService {

    @Autowired
    CommodityCategoryMapper commodityCategoryMapper;

    /**
     * 获取所有三级分类
     */
    public List<CommodityCategory> selectAllCategory3(){
        return commodityCategoryMapper.selectAllCategory3();
    }


    /**
     * 根据name查询分类
     */
    public CommodityCategory selectCategoryByName(String name){
        return commodityCategoryMapper.selectCategory(name);
    }

}
